package com.viethp.mt.objects;

import org.ksoap2.serialization.SoapObject;

public class OApplicant {

	private static final String XML_ITEM_ID = "item_id";
	private static final String XML_USER_ID = "user_id";
	private static final String XML_ACTIVITY_ID = "activity_id";
	private static final String XML_USERNAME = "username";
	private static final String XML_EMAIL = "email";
	private static final String XML_PHONE = "phone";
	private static final String XML_POSTING = "posting";
	private static final String XML_BOUGHT = "bought";
	private static final String XML_PAID = "paid";
	private static final String XML_BIDDING = "bidding";
	private static final String XML_STATUS = "status";
	private static final String XML_PRICE = "price";

	private int item_id;
	private int activity_id;
	private int user_id;
	private String username;
	private String email;
	private String phone;
	private int posting;
	private String bought;
	private String paid;
	private int bidding;
	private int status;
	private String price;

	public OApplicant(SoapObject OApplicant) {
		if (OApplicant != null && OApplicant.hasProperty(XML_ITEM_ID)) {
			this.item_id = Integer.parseInt(OApplicant.getProperty(XML_ITEM_ID)
					.toString());
			this.activity_id = Integer.parseInt(OApplicant.getProperty(
					XML_ACTIVITY_ID).toString());
			this.user_id = Integer.parseInt(OApplicant.getProperty(XML_USER_ID)
					.toString());
			this.username = OApplicant.getProperty(XML_USERNAME).toString();
			this.email = OApplicant.getProperty(XML_EMAIL).toString();
			this.phone = OApplicant.getProperty(XML_PHONE).toString();
			this.posting = Integer.parseInt(OApplicant.getProperty(XML_POSTING)
					.toString());
			this.bought = OApplicant.getProperty(XML_BOUGHT)
					.toString();
			this.paid = OApplicant.getProperty(XML_PAID)
					.toString();
			this.bidding = Integer.parseInt(OApplicant.getProperty(XML_BIDDING)
					.toString());
			this.status = Integer.parseInt(OApplicant.getProperty(XML_STATUS)
					.toString());
			this.price = OApplicant.getProperty(XML_PRICE).toString();
		}
	}

	public void setItemId(int id) {
		this.item_id = id;
	}

	public void setUserId(int id) {
		this.user_id = id;
	}

	public void setActivityId(int id) {
		this.activity_id = id;
	}

	public void setUsername(String name) {
		this.username = name;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public void setPrice(String price) {
		this.price = price;
	}

	public void setPosting(int post) {
		this.posting = post;
	}

	public void setBought(String bought) {
		this.bought = bought;
	}

	public void setPaid(String paid) {
		this.paid = paid;
	}

	public void setBidding(int bidding) {
		this.bidding = bidding;
	}

	public void setStatic(int status) {
		this.status = status;
	}

	// get
	public int getItemId() {
		return this.item_id;
	}

	public int getUserId() {
		return this.user_id;
	}

	public int getActivityId() {
		return this.activity_id;
	}

	public String getUsername() {
		return this.username;
	}

	public String getEmail() {
		return this.email;
	}

	public String getPhone() {
		return this.phone;
	}

	public String getPrice() {
		return this.price;
	}

	public int getPosting() {
		return this.posting;
	}

	public String getBought() {
		return this.bought;
	}

	public String getPaid() {
		return this.paid;
	}

	public int getBidding() {
		return this.bidding;
	}

	public int getStatic() {
		return this.status;
	}
}
